const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  devServer:{
    port:7000,
    // 新增代理配置
    proxy: {
      '/api': {
        target: 'http://localhost:8080',
        changeOrigin: true,
        pathRewrite: { '^/api': '' },
        // 添加以下header设置
        headers: {
          'Connection': 'keep-alive',
          'Cache-Control': 'no-cache'
        }
      }
    }
  }
})
